package com.ruoyi.system.domain;

import java.util.Date;
import java.util.List;
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 【请填写功能名称】对象 task
 * 
 * @author ruoyi
 * @date 2025-02-14
 */
public class Task extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @Excel(name = "主键")
    private Long id;

    /** 父级id */
    @Excel(name = "父级id")
    private Long parentId;

    /** 是否是主任务 0- 否1-是 */
    @Excel(name = "是否是主任务 0- 否1-是")
    private String isMain;

    /** 任务名称 */
    @Excel(name = "任务名称")
    private String name;

    /** 负责人账号 */
    @Excel(name = "负责人账号")
    private String leader;

    /** 优先级 0-低 1-中 2-高 */
    @Excel(name = "优先级 0-低 1-中 2-高")
    private String level;

    /** 状态 0-未开始 1-进行中 2-阻塞 3-已完成 */
    @Excel(name = "状态 0-未开始 1-进行中 2-阻塞 3-已完成")
    private String status;

    /** 计划开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "计划开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date planStartTime;

    /** 计划结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "计划结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date planEndTime;

    /** 实际完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实际完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /** 前提条件:多个用，隔开 */
    @Excel(name = "前提条件:多个用，隔开")
    private String beforeId;

    /** 里程碑的id */
    @Excel(name = "里程碑的id")
    private Long milestoneId;

    /** 预计完成时间 */
    private double estimateTime;

    /** 实际完成时间 */
    private double actualTime;

    public double getEstimateTime() {
        return estimateTime;
    }

    public void setEstimateTime(double estimateTime) {
        this.estimateTime = estimateTime;
    }

    public double getActualTime() {
        return actualTime;
    }

    public void setActualTime(double actualTime) {
        this.actualTime = actualTime;
    }

    public Long getMilestoneId() {
        return milestoneId;
    }

    public void setMilestoneId(Long milestoneId) {
        this.milestoneId = milestoneId;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setParentId(Long parentId) 
    {
        this.parentId = parentId;
    }

    public Long getParentId() 
    {
        return parentId;
    }
    public void setIsMain(String isMain) 
    {
        this.isMain = isMain;
    }

    public String getIsMain() 
    {
        return isMain;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setLeader(String leader) 
    {
        this.leader = leader;
    }

    public String getLeader() 
    {
        return leader;
    }
    public void setLevel(String level) 
    {
        this.level = level;
    }

    public String getLevel() 
    {
        return level;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setPlanStartTime(Date planStartTime) 
    {
        this.planStartTime = planStartTime;
    }

    public Date getPlanStartTime() 
    {
        return planStartTime;
    }
    public void setPlanEndTime(Date planEndTime) 
    {
        this.planEndTime = planEndTime;
    }

    public Date getPlanEndTime() 
    {
        return planEndTime;
    }
    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }
    public void setBeforeId(String beforeId) 
    {
        this.beforeId = beforeId;
    }

    public String getBeforeId() 
    {
        return beforeId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("parentId", getParentId())
            .append("isMain", getIsMain())
            .append("name", getName())
            .append("remark", getRemark())
            .append("leader", getLeader())
            .append("level", getLevel())
            .append("status", getStatus())
            .append("planStartTime", getPlanStartTime())
            .append("planEndTime", getPlanEndTime())
            .append("endTime", getEndTime())
            .append("beforeId", getBeforeId())
            .toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Task task = (Task) o;
        return Objects.equals(id, task.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
